# 定义元组
names = ('小东', '小刚', '小红', '小明', '小刚')
# print(names, type(names))
# 1.访问
# print(names[0], names[-2])
# print(names[1:3])
# 不允许修改
# names[0] = '小军'
# 2.获取长度
# print(len(names))
# # 3.统计指定元素的数量
# print(names.count('小刚'))
# # 4.获取指定元素的下标
# print(names.index('小刚'))
# 5.遍历
# for item in names:
#     print(item)
nums = (23, )
print(nums, type(nums))
